package com.pushtime.service.dto;

import java.io.Serializable;
import java.util.Objects;
import io.github.jhipster.service.filter.BooleanFilter;
import io.github.jhipster.service.filter.DoubleFilter;
import io.github.jhipster.service.filter.Filter;
import io.github.jhipster.service.filter.FloatFilter;
import io.github.jhipster.service.filter.IntegerFilter;
import io.github.jhipster.service.filter.LongFilter;
import io.github.jhipster.service.filter.StringFilter;
import io.github.jhipster.service.filter.InstantFilter;

/**
 * Criteria class for the HdfsLog entity. This class is used in HdfsLogResource to
 * receive all the possible filtering options from the Http GET request parameters.
 * For example the following could be a valid requests:
 * <code> /hdfs-logs?id.greaterThan=5&amp;attr1.contains=something&amp;attr2.specified=false</code>
 * As Spring is unable to properly convert the types, unless specific {@link Filter} class are used, we need to use
 * fix type specific filters.
 */
public class HdfsLogCriteria implements Serializable {

    private static final long serialVersionUID = 1L;

    private LongFilter id;

    private StringFilter name;

    private StringFilter src;

    private StringFilter dst;

    private LongFilter totalSize;

    private LongFilter currentSize;

    private DoubleFilter process;

    private IntegerFilter state;

    private StringFilter desc;

    private InstantFilter createdDate;

    public HdfsLogCriteria() {
    }

    public LongFilter getId() {
        return id;
    }

    public void setId(LongFilter id) {
        this.id = id;
    }

    public StringFilter getName() {
        return name;
    }

    public void setName(StringFilter name) {
        this.name = name;
    }

    public StringFilter getSrc() {
        return src;
    }

    public void setSrc(StringFilter src) {
        this.src = src;
    }

    public StringFilter getDst() {
        return dst;
    }

    public void setDst(StringFilter dst) {
        this.dst = dst;
    }

    public LongFilter getTotalSize() {
        return totalSize;
    }

    public void setTotalSize(LongFilter totalSize) {
        this.totalSize = totalSize;
    }

    public LongFilter getCurrentSize() {
        return currentSize;
    }

    public void setCurrentSize(LongFilter currentSize) {
        this.currentSize = currentSize;
    }

    public DoubleFilter getProcess() {
        return process;
    }

    public void setProcess(DoubleFilter process) {
        this.process = process;
    }

    public IntegerFilter getState() {
        return state;
    }

    public void setState(IntegerFilter state) {
        this.state = state;
    }

    public StringFilter getDesc() {
        return desc;
    }

    public void setDesc(StringFilter desc) {
        this.desc = desc;
    }

    public InstantFilter getCreatedDate() {
        return createdDate;
    }

    public void setCreatedDate(InstantFilter createdDate) {
        this.createdDate = createdDate;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final HdfsLogCriteria that = (HdfsLogCriteria) o;
        return
            Objects.equals(id, that.id) &&
            Objects.equals(name, that.name) &&
            Objects.equals(src, that.src) &&
            Objects.equals(dst, that.dst) &&
            Objects.equals(totalSize, that.totalSize) &&
            Objects.equals(currentSize, that.currentSize) &&
            Objects.equals(process, that.process) &&
            Objects.equals(state, that.state) &&
            Objects.equals(desc, that.desc) &&
            Objects.equals(createdDate, that.createdDate);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
        id,
        name,
        src,
        dst,
        totalSize,
        currentSize,
        process,
        state,
        desc,
        createdDate
        );
    }

    @Override
    public String toString() {
        return "HdfsLogCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (name != null ? "name=" + name + ", " : "") +
                (src != null ? "src=" + src + ", " : "") +
                (dst != null ? "dst=" + dst + ", " : "") +
                (totalSize != null ? "totalSize=" + totalSize + ", " : "") +
                (currentSize != null ? "currentSize=" + currentSize + ", " : "") +
                (process != null ? "process=" + process + ", " : "") +
                (state != null ? "state=" + state + ", " : "") +
                (desc != null ? "desc=" + desc + ", " : "") +
                (createdDate != null ? "createdDate=" + createdDate + ", " : "") +
            "}";
    }

}
